package com.hcss.common.util.excel.rull;

import java.util.List;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ExcelRullResult<T> {
	
	private static final String SUCC_MSG = "校验成功";
	
	private Boolean result;
	
	private String msg;
	
	private List<T> list;
	
	private ExcelRullResult(Boolean result, String msg, List<T> list) {
		this.result = result;
		this.msg = msg;
		this.list = list;
	}
	
	public static <T> ExcelRullResult<T> getSuccResult(List<T> list) {
		return new ExcelRullResult<>(true, SUCC_MSG, list);
	}
	
	public static <T> ExcelRullResult<T> getFailResult(String errorMsg) {
		return new ExcelRullResult<>(false, errorMsg, null); //错误的情况下不需要list数据
	}
	
	
	
	
	

}

    